package models;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import play.db.jpa.Model;
/**
 * 实体类 — 信息管理类
 * */
@Entity
@Table(name="information")
public class Information extends Model{

	@Column(name="inf_tit",length=150)
	public String infTit;                               //信息标题
	
	@Column(name="inf_det",columnDefinition="text")
	public String infDet;                               //信息详情
	
	@Column(name="inf_time")
	@Temporal(TemporalType.TIMESTAMP)
	public Date infTime;                              //发布时间
	
	@ManyToOne
	@JoinColumn(name="pro_id")
	public Programa programa;                         //所属栏目
	
	@ManyToOne
	@JoinColumn(name="man_id")
	public Managers managers;                           //管理员
	@Column(name="inf_code")
	public String infCode;                             //信息代码

	public String toString(){
		return infTit;
	}
}
